package edu.nanyang.service;

import edu.nanyang.dao.OptionInfoDao;
import edu.nanyang.domain.OptionInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service


public class OptionInfoService {
    @Resource
    private OptionInfoDao optionInfoDao;

    public OptionInfo getById(int id){
        return optionInfoDao.getById(id);
    }
    public int deleteById(int id) {
        return optionInfoDao.deleteById(id);
    }

    public int update(OptionInfo optionInfo) {
      return optionInfoDao.update(optionInfo);
    }

    public int add(OptionInfo optionInfo) {
        return optionInfoDao.add(optionInfo);
    }

    public OptionInfo getByNumIdAndType(int questionNumId, String optionType) {
        return optionInfoDao.getByNumIdAndType(questionNumId,optionType);


    }
}
